var baseRoot = window.ROOT_URL;
require.config({
    waitSeconds: 60,
    paths: {
        'layui': baseRoot + '/static/plugs/layui/layui',
        'md5': [baseRoot + '/static/plugs/jquery/md5.min'],
        'spop': [baseRoot + '/static/plugs/spop/spop.min'], //加载进度条
        'json': [baseRoot + '/static/plugs/jquery/json.min'],
        'upload': [baseRoot + '/static/plugs/plupload/build'],
        'base64': [baseRoot + '/static/plugs/jquery/base64.min'],
        'angular': [baseRoot + '/static/plugs/angular/angular.min'],
        'ckeditor': [baseRoot + '/static/plugs/ckeditor/ckeditor'],
        'plupload': [baseRoot + '/static/plugs/plupload/plupload.full.min'],
        'websocket': [baseRoot+ '/static/plugs/socket/websocket'],
        'pcasunzips': [baseRoot + '/static/plugs/jquery/pcasunzips'],
        'jquery.ztree': [baseRoot + '/static/plugs/ztree/ztree.all.min'],
        'jquery.masonry': [baseRoot + '/static/plugs/jquery/masonry.min'],
        'jquery.autocompleter': [baseRoot + '/static/plugs/jquery/autocompleter.min'],
        // 'jquery': [baseRoot + '/static/plugs/jquery/jquery.min'],
        'vue': [baseRoot + '/static/plugs/vue/vue'],

        'selectpage-build': [baseRoot + '/static/plugs/selectpage/build'],
        'selectpage': [baseRoot + '/static/plugs/selectpage/selectpage'],

        'plugs': [baseRoot + '/static/admin/js/utils/plugs'],
        'events': [baseRoot + '/static/admin/js/utils/events'],
        'files': [baseRoot + '/static/admin/js/utils/files'],
        'form': [baseRoot + '/static/admin/js/utils/form'],
        'message': [baseRoot + '/static/admin/js/utils/message'],
        'table-select': [baseRoot + '/static/admin/js/utils/table-select/build'],
    },
    shim: {
        'spop': {deps: ['css!' + baseRoot + '/static/plugs/spop/spop.min.css']},
        'websocket': {deps: [baseRoot + '/static/plugs/socket/swfobject.min.js']},
        'jquery.ztree': {deps: [ 'css!' + baseRoot + '/static/plugs/ztree/zTreeStyle/zTreeStyle.css']},
        'jquery.autocompleter': {deps: [ 'css!' + baseRoot + '/static/plugs/jquery/autocompleter.css']},
        'selectpage': [ 'css!' + baseRoot + '/static/plugs/selectpage/selectpage.css'],
    },
    map: {'*': {css: baseRoot + '/static/plugs/require/css.js'}},
    baseUrl: baseRoot,
    urlArgs: 'v=' + new Date().getTime()
});
require(['layui'],function(){
    // 注册jquery到require模块
    define('jquery', [], function () {
        return layui.$;
    });
    layui.use(['form','laydate','layer'],function(){
        window.form = layui.form;
        window.laydate = layui.laydate;
        window.layer = layui.layer;
        require(['events','message','files','form','plugs'], function () {

        })
    })
});
